Open
Conversation
asinghvi17
reviewed
Feb 25, 2026
| return Extents.Extent(merge(NamedTuple(extent), (X=(xmin, xmax), Y=(ymin, ymax)))) | ||
| end | ||
|
|
||
| # Check if corners transform to an axis-aligned rectangle |
Member
There was a problem hiding this comment.
why do you need this at all, bounds already invokes proj_trans_bounds which densifies the extent and returns it?
Member
There was a problem hiding this comment.
this check would seem to make this method completely useless in most cases 😅
asinghvi17
reviewed
Feb 25, 2026
Comment on lines
+282
to
+289
| function (trans::Transformation)(extent::Extents.Extent) | ||
| haskey(extent, :X) && haskey(extent, :Y) || | ||
| throw(ArgumentError("Extent must have X and Y dimensions")) | ||
|
|
||
| _check_axis_aligned(trans, extent) || | ||
| throw(ArgumentError("Cannot transform Extent: CRS is rotated or non-axis-aligned")) | ||
|
|
||
| (xmin, xmax), (ymin, ymax) = bounds(trans, extent.X, extent.Y) |
Member
There was a problem hiding this comment.
Suggested change
| function (trans::Transformation)(extent::Extents.Extent) | |
| haskey(extent, :X) && haskey(extent, :Y) || | |
| throw(ArgumentError("Extent must have X and Y dimensions")) | |
| _check_axis_aligned(trans, extent) || | |
| throw(ArgumentError("Cannot transform Extent: CRS is rotated or non-axis-aligned")) | |
| (xmin, xmax), (ymin, ymax) = bounds(trans, extent.X, extent.Y) | |
| function (trans::Transformation)(extent::Extents.Extent; densify_pts = 21) | |
| haskey(extent, :X) && haskey(extent, :Y) || | |
| throw(ArgumentError("Extent must have X and Y dimensions")) | |
| _check_axis_aligned(trans, extent) || | |
| throw(ArgumentError("Cannot transform Extent: CRS is rotated or non-axis-aligned")) | |
| (xmin, xmax), (ymin, ymax) = bounds(trans, extent.X, extent.Y; densify_pts) |
to pass that kwarg down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add transformations for
Extents.Extent. There is a check for rotation/skew etc - an extent is only valid if it remains the actual bounding box after the transormation.This doesn't actually add a dependency, just makes and existing dependency explicit.